home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
__MANDEL
/
MANDELBR
/
CMANDELI.C1
< prev
next >
Wrap
Text File
|
1992-03-26
|
2KB
|
56 lines
/* CMandelIntervalDialog.c */
#include "CMandelApp.h"
#include <Commands.h>
#include <CIntegerText.h>
#include "CMandelIntervalDialog.h"
#include "CMandelDoc.h"
#include <CWindow.h>
void CMandelIntervalDialog::IMandelIntervalDialog
(short DLOGid, CMandelDoc *aMandelDoc, CDirectorOwner *aSupervisor)
{
CIntegerText *aEditItem;
IDLOGDirector(DLOGid, aSupervisor);
FailNIL(aMandelDoc);
itsMandelDoc = aMandelDoc;
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kFAwakeTicksEdit);
aEditItem->SetIntValue(itsMandelDoc->itsFAwakeTicks);
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kFSleepTicksEdit);
aEditItem->SetIntValue(itsMandelDoc->itsFSleepTicks);
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kBAwakeTicksEdit);
aEditItem->SetIntValue(itsMandelDoc->itsBAwakeTicks);
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kBSleepTicksEdit);
aEditItem->SetIntValue(itsMandelDoc->itsBSleepTicks);
}
void CMandelIntervalDialog::DoCommand( long aCmd)
{
CIntegerText *aEditItem;
switch (aCmd)
{
case cmdOK:
if (Validate())
{
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kFAwakeTicksEdit);
itsMandelDoc->itsFAwakeTicks = CMandelDoc::cFAwakeTicks = aEditItem->GetIntValue();
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kFSleepTicksEdit);
itsMandelDoc->itsFSleepTicks = CMandelDoc::cFSleepTicks = aEditItem->GetIntValue();
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kBAwakeTicksEdit);
itsMandelDoc->itsBAwakeTicks = CMandelDoc::cBAwakeTicks = aEditItem->GetIntValue();
aEditItem = (CIntegerText *)itsWindow->FindViewByID(kBSleepTicksEdit);
itsMandelDoc->itsBSleepTicks = CMandelDoc::cBSleepTicks = aEditItem->GetIntValue();
}
else
break;
default:
inherited::DoCommand( aCmd);
break;
}
}